<template>
  <a-config-provider :locale="locale">
    <div id="nav">
        <a-spin :spinning="store.state.loading" tip="加载中">
            <router-view />
        </a-spin>

    </div>
  </a-config-provider>
<!--  <div id="nav">-->
<!--    <router-link to="/">Home</router-link> |-->
<!--    <router-link to="/about">About</router-link>-->
<!--  </div>-->
<!--  <router-view/>-->
</template>

<script lang="ts">
  import {defineComponent} from "vue";
  import {useStore} from "vuex";
  import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
  export default defineComponent({
    setup() {
        const store = useStore()
        console.log(111111)
      return{
        locale: zhCN,
          loading: store.state.loading,
          store
      }
    }
  })
</script>

<style lang="less" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  //padding: 30px;
  height: 100%;
  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
::v-deep .ant-spin-nested-loading{
    height: 100% !important;
}
::v-deep .ant-spin-container {
    height: 100% !important;
}
</style>
